import storageApi from '../../core/storage/storage';
import BaseController from '../../core/controllers/Base.controller';

@Inject('$log', '$rootScope', 'globalService', 'deviceService')
class DeviceClassifyController extends BaseController {
  constructor() {
    super();

    this.paginationService = this.deviceService;
    this.$setQueryCallback((res) => {
      this.equipListData = res.rows;
    });
    this.mapParams = {
      orgId: $rootScope.orgId || storageApi.get('orgId'),
      // deviceName: '',
      // code: '',
      // inOutStatus: '',
    };
    this.init();
    this.$query({ value: '01', name: '特种设备' }, 0);
  }

  $query(item, $index) {
    this.data.menuCurrentIndex = $index;
    this.mapParams.catgegroy = item.value;
    this.$paginationQuery();
  }

  init() {
    this.data = {
      menuCurrentIndex: 0,
      otherClassify: false,
    };
  }
}

export default DeviceClassifyController;
